The present disclosure generally relates to electronic circuits, and more particularly to a circuit for comparing a voltage with a threshold. It particularly aims at a circuit having a low power consumption, which may particularly be used in an ambient energy harvesting generator. It further aims at an ambient energy harvesting generator comprising such a circuit.